x86/HVM: slightly improve hvm_mmio_{first,last}_byte()
authorJan Beulich <jbeulich@suse.com>
Tue, 26 Apr 2016 11:47:21 +0000 (13:47 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 26 Apr 2016 11:47:21 +0000 (13:47 +0200)
commit4561569a11353688b97220be8d6a0821d53b97a6
treef23b72cca7cd5b41777bcbd13c3953011d57a14a
parent276da2785e3797885aadb135a957279b73ecf076
x86/HVM: slightly improve hvm_mmio_{first,last}_byte()

EFLAGS.DF can be assumed to be usually clear, so unlikely()-annotate
the conditionals accordingly.

Also prefer latching p->size (used twice) into a local variable, at
once making it unnecessary for the reader to be sure expressions get
evaluated left to right (operand promotion would yield a different
result if p->addr + p->size - 1 was evaluted right to left).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Paul Durrant <paul.durrant@citrix.com>
Release-acked-by: Wei Liu <wei.liu2@citrix.com>
xen/include/asm-x86/hvm/io.h